From: Pavel Janík Date: Fri, 12 Jul 2002 08:56:12 +0000 (+0000) Subject: (describe-variable): Mention if the variable is an alias. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~31742 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4cad397d6382d9220fe3df71bd0540bd514c448f;p=emacs.git (describe-variable): Mention if the variable is an alias. --- diff --git a/lisp/help-fns.el b/lisp/help-fns.el index f62443ef152..d4daa2fa11c 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -438,7 +438,16 @@ it is displayed along with the global value." (terpri))) (let ((doc (documentation-property variable 'variable-documentation))) (princ (or doc "Not documented as a variable."))) - + + ;; Mention if the variable is an alias. + (let ((alias (condition-case nil + (indirect-variable variable) + (error variable)))) + (unless (eq alias variable) + (terpri) + (terpri) + (princ (format "This variable is an alias for `%s'." alias)))) + ;; Make a link to customize if this variable can be customized. ;; Note, it is not reliable to test only for a custom-type property ;; because those are only present after the var's definition